/* 
 * File:   DocumentParser.h
 * Author: taylor
 *
 * Created on November 7, 2012, 2:25 PM
 */

#ifndef DOCUMENTPARSER_H
#define	DOCUMENTPARSER_H

#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <map>


using namespace std;

class DocumentParser {
public:
    /**
     * Parse a vector of document info
     * @param aStr
     */
    void parseInfo(vector<string>& aStr);
    /**
     * Separate a string by whitespace characters
     * @param str
     * @param aStr
     */
    void breakIntoTokens(string str, vector<string>& aStr);
private:
    string stopWordFile;
    /**
     * Remove punctuation from a string
     * @param str
     * @return a string with punctuation removed
     */
    string removePunctuation(string& str);
    /**
     * Remove stop words from a string
     * @param aStr
     */
    void removeStopWords(vector<string> &aStr);
    void removeCopies(vector<string>& vec);
    void stemVector(vector<string> &aStr);
};

#endif	/* DOCUMENTPARSER_H */

